//created by: Huiyi

Ext.define('MajorProjectSenchaTouch.controller.Citation', {
    extend: 'Ext.app.Controller',
    config:{
        views: ['CitationModule.Citation'],
        refs:{
            navView: 'mainNavView',
            Citation1: 'button[action=citation1pdf]',
            Citation2: 'button[action=citation2pdf]',
			Citation3: 'button[action=citation3pdf]',
			
        },

       control:{
           Citation1:{
               tap: 'citation1pdf'
           },
           Citation2:{
               tap: 'citation2pdf'
           },
		   Citation3:{
               tap: 'citation3pdf'
           }
       }
   },

	
	   citation1pdf: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open(MajorProjectSenchaTouch.app.citation1);
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },
	
	  citation2pdf: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open(MajorProjectSenchaTouch.app.citation2);
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    },

	  citation3pdf: function(){
        var ctrl = this.getApplication().getController('Main');
        var previousPage = ctrl.showMask();
        
        var task = Ext.create('Ext.util.DelayedTask', function(){
            window.open(MajorProjectSenchaTouch.app.citation3);
            ctrl.hideMask(previousPage);  
        });
        task.delay(1);
     
    }
    

    
});

